/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.unipar.cursoweb.validator;

/**
 *
 * @author altitdb
 */
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.FacesValidator;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;

@FacesValidator(value="myValidator")
public class MyValidator implements Validator {

    @Override
    public void validate(FacesContext context, UIComponent component, Object value)
        throws ValidatorException
    {
        System.out.println("MyValidator validate: " + value);
//        throw new ValidatorException(new FacesMessage("Validation failed."));
    }

}
